#pragma once

#include "jtag.h"
#include "commands.h"

class jtag_tap;

class interface_jtag : public jtag_cmds
{
public:
    int interface_jtag_add_dr_scan(jtag_tap *active, int in_num_fields,
		                               const struct scan_field *in_fields, tap_state_t state);
    int interface_jtag_add_ir_scan(struct jtag_tap *active,
		                               const struct scan_field *in_fields, tap_state_t state);
    int interface_jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, 
                                         tap_state_t state);
    int interface_jtag_add_tlr(void);

    int interface_jtag_add_runtest(int num_cycles, tap_state_t state);
    
    int interface_jtag_add_reset(int req_trst, int req_srst);

private:
    int jtag_add_plain_scan(int num_bits, const uint8_t *out_bits,
		                        uint8_t *in_bits, tap_state_t state, 
                            bool ir_scan);
};
